// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:54:17


// Source File Name:   q3.java

package com.zelix;

import java.awt.*;
import java.awt.event.*;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.File;
import java.util.EventObject;
import java.util.Set;
import javax.swing.*;


//            a3, it, eo, zo, 
//            z2, to, yw, zz, 
//            m4, qz, sz, j0, 
//            tb

class q3 extends a3
    implements ActionListener, KeyListener, PropertyChangeListener, eo
{

    String f;
    yw g;
    m4 h;
    JButton i;
    JButton j;
    JButton k;
    boolean l;
    private static String m[];
    private static String z[];

    q3(JFrame jframe, String s, String s1, String s2, String s3, yw yw1)
    {
        super(jframe, s, s3, s1, s2);
        g = yw1;
        f = s3;
        g();
        zz.b(i);
    }

    public void actionPerformed(ActionEvent actionevent)
    {
label0:
        {
            boolean flag = tb.b;
            Object obj = actionevent.getSource();
            if(!(obj instanceof JButton))
                break label0;
            JButton jbutton = (JButton)obj;
            if(jbutton == i)
            {
                j();
                if(!flag)
                    break label0;
            }
            if(jbutton == j)
            {
                f();
                if(!flag)
                    break label0;
            }
            if(jbutton == k)
                i();
        }
    }

    protected void f()
    {
        l = true;
        a();
        g.a();
    }

    public final void a()
    {
        super.a();
        if(!l)
            g.a();
    }

    protected final void i()
    {
        to.a(to.B);
    }

    boolean a(File file, String s)
    {
        Set set = ((z2)super.d).f().n();
        if(set.contains(file))
        {
            String as[] = {
                z[8], z[6]
            };
            int i1 = JOptionPane.showOptionDialog(this, s, z[7], 2, 0, null, as, as[0]);
            if(i1 == 1)
                return false;
        }
        return true;
    }

    public void keyPressed(KeyEvent keyevent)
    {
label0:
        {
            boolean flag = tb.b;
            if(keyevent.getKeyCode() != 10)
                break label0;
            if(keyevent.getSource() == i || keyevent.getSource() == h)
            {
                j();
                if(!flag)
                    break label0;
            }
            if(keyevent.getSource() == j)
            {
                f();
                if(!flag)
                    break label0;
            }
            if(keyevent.getSource() == k)
                i();
        }
    }

    public void keyReleased(KeyEvent keyevent)
    {
    }

    public void keyTyped(KeyEvent keyevent)
    {
    }

    void j()
    {
        File file = h.e();
        if(a(file, z[9]))
        {
            l = true;
            a();
            g.a(file, new Integer(1));
        }
    }

    public void propertyChange(PropertyChangeEvent propertychangeevent)
    {
label0:
        {
            if(!propertychangeevent.getPropertyName().equals(z[10]))
                break label0;
            File afile[] = (File[])propertychangeevent.getNewValue();
            if(afile == null || afile.length == 0)
            {
                i.setEnabled(false);
                if(!tb.b)
                    break label0;
            }
            i.setEnabled(true);
        }
    }

    protected void a(String s, String s1, j0 j0_1, Container container)
    {
        i = new JButton(s);
        i.setToolTipText(s1);
        container.add(i, z[0]);
        i.setEnabled(false);
        j = new JButton(z[3]);
        j.setToolTipText(to.b(to.Z));
        container.add(j, z[4]);
        k = new JButton(z[2]);
        k.setToolTipText(to.b(to.ab));
        container.add(k, z[1]);
        i.addActionListener(this);
        j.addActionListener(this);
        k.addActionListener(this);
        i.addKeyListener(this);
        j.addKeyListener(this);
        k.addKeyListener(this);
        j0_1.a(m);
    }

    protected void a(Object obj, Object obj1, Object obj2, Object obj3, Object obj4, Object obj5, Object obj6)
    {
        Container container = getContentPane();
        j0 j0_1 = new j0(container);
        container.setLayout(j0_1);
        File file = null;
        File file1 = null;
        String s = (String)obj;
        String s1 = (String)obj1;
        String s2 = (String)obj2;
        if(s != null)
        {
            File file2 = new File(s);
            if(file2.exists() && file2.isDirectory())
            {
                file1 = file2;
                file = file1.getParentFile();
            }
        }
        qz aqz[] = {
            new sz()
        };
        h = new m4(file, false, 2, aqz, 0, false);
        container.add(h, z[5]);
        h.addKeyListener(this);
        h.addPropertyChangeListener(this);
        a(s1, s2, j0_1, container);
        h.a(file1, true);
        setResizable(true);
        setIconImage(zo.a(this));
        zz.a(this);
    }

    private static char[] z(String str) {
        char ac[] = str.toCharArray();
        int clen = ac.length;
        if (clen >= 2)
            return ac;
        ac[0] ^= 4;
        return ac;
    }

    private static String z(char[] chs) {
        for (int i = 0; i < chs.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key = 0x42;
                    break;
                case 1:
                    key = 73;
                    break;
                case 2:
                    key = 106;
                    break;
                case 3:
                    key =68;
                    break;
                default:
                    key =4;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static
    {
        String as[] = new String[11];
        as[0] = z(z("-\"(0j"));
        as[1] = z(z("*,\0064F6'"));
        as[2] = z(z("\n,\0064"));
        as[3] = z(z("\001(\004'a."));
        as[4] = z(z("!(\004'a.\013\036*"));
        as[5] = z(z("$ \006!W'%\017'p-;"));
        as[6] = z(z("\f&"));
        as[7] = z(z("\001%\0137wb&\034!v5;\0030ab>\0136j+'\r"));
        as[8] = z(z("\033,\031"));
        as[9] = z(z("\021&\007!$$ \006!wb>\003(hb+\017dw#?\017 $6&J0l'i\031%i'i\f+h&,\030db0&\007ds* \t,$6!\017=$5,\030!$-9\017*a&gJ\007k,=\003*q'v"));
        as[10] = z(z("1,\006!g6 \005*G*(\004#a&"));
        z = as;
        String as1[] = new String[17];
        as1[0] = z(z(".(\023+q6g\007-j\025 \0160l\177+\036*S+-\036,.vbXq"));
        as1[1] = z(z(".(\023+q6g\007-j\n,\003#l6tYt4"));
        as1[2] = z(z("$ \006!W'%\017'p-;D(a$=Wq"));
        as1[3] = z(z("$ \006!W'%\017'p-;D0k2tZ"));
        as1[4] = z(z("$ \006!W'%\017'p-;D&k6=\005)9!&\0040e+'\0176* &\0360k/d\b0j\n,\003#l6d[q"));
        as1[5] = z(z("$ \006!W'%\017'p-;D6m%!\036yg-'\036%m,,\030jv+.\0020)w"));
        as1[6] = z(z(" =\004\023m&=\002yi#1B+o\000=\004j`'/\0131h6\036\003 p*eJ'e,*\017(F6'D a$(\037(p\025 \0160lni\002!h2\013\036**&,\f%q.==-`6!C"));
        as1[7] = z(z(" =\004\fa+.\00209/(\022lk)\013\036**&,\f%q.=\"!m%!\036h$!(\004'a.\013\036**&,\f%q.=\"!m%!\036h$*,\0064F6'D a$(\037(p\n,\003#l6`"));
        as1[8] = z(z("-\"(0jl*\017*p';2yg-'\036%m,,\030js+-\036,.s\177Eu4r"));
        as1[9] = z(z("-\"(0jl+\0050p-$W'k,=\013-j';D&k6=\005))w"));
        as1[10] = z(z("-\"(0jl>\003 p*t\b0j\025 \0160l"));
        as1[11] = z(z("!(\004'a.\013\036**!,\0040a0\021W'k,=\013-j';D3m&=\002n1rf[t4"));
        as1[12] = z(z("!(\004'a.\013\036** &\0360k/t\t+j6(\003*a0g\b+p6&\007i1"));
        as1[13] = z(z("!(\004'a.\013\036**5 \0160l\177+\036*S+-\036,"));
        as1[14] = z(z("*,\0064F6'D'a,=\0176\\\177*\005*p# \004!vl>\003 p*cRp+syZ"));
        as1[15] = z(z("*,\0064F6'D&k6=\005)9!&\0040e+'\0176* &\0360k/d_"));
        as1[16] = z(z("*,\0064F6'D3m&=\002yf6'=-`6!"));
        m = as1;
    }
}